{% extends "./layout.html" %}

{% block css %}
<link rel="stylesheet" href="/static/css/buyer.css" />
{% endblock %}

{% block content %}
<div id="loginBox">
    <div class="login-item"><input type="text" id="InputUsername" placeholder="请输入用户名" /></div>
    <div class="login-item"><input type="password" id="InputUserPwd" placeholder="请输入密码"/></div>
    <div class="login-item"><a onclick="Login()">登录</a></div>
</div>
<div id="registerBox">
    <div class="login-item"><input type="text" id="Username" placeholder="请输入用户名" /></div>
    <div class="login-item"><input type="password" id="UserPwd" placeholder="请输入密码"/></div>
    <div class="login-item"><input type="password" id="rePwd" placeholder="再次输入密码"/></div>
    <div class="login-item"><a onclick="Register()">注册</a></div>
</div>

<div class="my-goodscontent">
    {% for item in result %}
    <ul class="my-goodsclass">
        <li><img width="190px" height="190px" src="{{item.thumb}}" /></li>
        <li>商品名：<a href="##">{{item.goodsname}}</a></li>
        <li>商品价格：<a href="##">{{item.price}}</a></li>
        <li>简介：<a href="##">{{item.des}}</a></li>
    </ul>
    {% endfor %}
</div>


<div class="my-pages">
<nav aria-label="Page navigation">
    <ul class="pagination">
        {% if page>1 %}
        <li>
            <a href="/?page={{page-1}}&count={{count}}&search={{search}}" aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
            </a>
        </li>
        {% else %}
        <li>
            <a aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
            </a>
        </li>
        {% endif %}

        {% for item in arr %}
        <li><a href="/?page={{item}}&count={{count}}&search={{search}}">{{item}}</a></li>
        {% endfor %}

        {% if page<arr.length %}
        <li>
            <a href="/?page={{page+1}}&count={{count}}&search={{search}}" aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
        {% else %}
        <li>
            <a aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
        {% endif %}
    </ul>
</nav>
</div>
{% endblock %}


{% block js %}
<script src="/static/js/buyer.js"></script>
{% endblock %}